﻿do
	IGAS:NewAddon("IGAS_Studio")

	local _DB

	------------------------------------------------------------
	-- ScriptType
	------------------------------------------------------------
	_DB = CreateHelpDB(IGAS.GUI.Widget.Button, "ScriptType")
	_DB:SetBaseHelpDB(CreateHelpDB(IGAS.GUI.Widget.Frame, "ScriptType"))

	------------------------------------------------------------
	-- Function
	------------------------------------------------------------
	_DB = CreateHelpDB(IGAS.GUI.Widget.Button, "Function")
	_DB:SetBaseHelpDB(CreateHelpDB(IGAS.GUI.Widget.Frame, "Function"))

	_DB:AddCodeHelp("GetNormalFontObject", [=[Returns the font object used for the button's normal state]=], [=[GetNormalFontObject()]=])
	_DB:AddCodeHelp("SetFormattedText", [=[Sets the button's label text using format specifiers]=], [=[SetFormattedText("formatString", ...)]=])
	_DB:AddCodeHelp("SetFontString", [=[Sets the `FontString` object used for the button's label text]=], [=[SetFontString(fontstring)]=])
	_DB:AddCodeHelp("Enable", [=[Allows user interaction with the button]=], [=[Enable()]=])
	_DB:AddCodeHelp("SetText", [=[Sets the text displayed as the button's label]=], [=[SetText("text")]=])
	_DB:AddCodeHelp("GetDisabledFontObject", [=[Returns the font object used for the button's disabled state]=], [=[GetDisabledFontObject()]=])
	_DB:AddCodeHelp("GetText", [=[Returns the text of the button's label]=], [=[GetText()]=])
	_DB:AddCodeHelp("SetDisabledFontObject", [=[Sets the font object used for the button's disabled state]=], [=[SetDisabledFontObject(font)]=])
	_DB:AddCodeHelp("GetTextHeight", [=[Returns the height of the button's text label]=], [=[GetTextHeight()]=])
	_DB:AddCodeHelp("Click", [=[Performs a (virtual) mouse click on the button]=], [=[Click("button", down)]=])
	_DB:AddCodeHelp("RegisterForClicks", [=[Registers a button to receive mouse clicks]=], [=[RegisterForClicks(...)]=])
	_DB:AddCodeHelp("UnlockHighlight", [=[Unlocks the button's highlight state]=], [=[UnlockHighlight()]=])
	_DB:AddCodeHelp("SetFont", [=[Sets the font instance's basic font properties]=], [=[SetFont("filename", fontHeight, "flags")]=])
	_DB:AddCodeHelp("GetTextWidth", [=[Returns the width of the button's text label]=], [=[GetTextWidth()]=])
	_DB:AddCodeHelp("SetHighlightFontObject", [=[Sets the font object used when the button is highlighted]=], [=[SetHighlightFontObject(font)]=])
	_DB:AddCodeHelp("IsEnabled", [=[Returns whether user interaction with the button is allowed]=], [=[IsEnabled()]=])
	_DB:AddCodeHelp("Disable", [=[Disallows user interaction with the button]=], [=[Disable()]=])
	_DB:AddCodeHelp("GetButtonState", [=[Returns the button's current state]=], [=[GetButtonState()]=])
	_DB:AddCodeHelp("GetStyle", [=[Get the Button's Style]=], [=[GetStyle()]=])
	_DB:AddCodeHelp("GetNormalTexture", [=[Returns the texture used for the button's normal state]=], [=[GetNormalTexture()]=])
	_DB:AddCodeHelp("GetHighlightFontObject", [=[Returns the font object used when the button is highlighted]=], [=[GetHighlightFontObject()]=])
	_DB:AddCodeHelp("SetButtonState", [=[Sets the button's state]=], [=[SetButtonState("state", lock)]=])
	_DB:AddCodeHelp("GetDisabledTexture", [=[Returns the texture used when the button is disabled]=], [=[GetDisabledTexture()]=])
	_DB:AddCodeHelp("GetPushedTextOffset", [=[Returns the offset for moving the button's label text when pushed]=], [=[GetPushedTextOffset()]=])
	_DB:AddCodeHelp("GetPushedTexture", [=[Returns the texture used when the button is pushed]=], [=[GetPushedTexture()]=])
	_DB:AddCodeHelp("SetStyle", [=[Set the Button's Style]=], [=[SetStyle(style)]=])
	_DB:AddCodeHelp("GetHighlightTexture", [=[Returns the texture used when the button is highlighted]=], [=[GetHighlightTexture()]=])
	_DB:AddCodeHelp("SetPushedTextOffset", [=[Sets the offset for moving the button's label text when pushed]=], [=[SetPushedTextOffset(x, y)]=])
	_DB:AddCodeHelp("SetNormalFontObject", [=[Sets the font object used for the button's normal state]=], [=[SetNormalFontObject(font)]=])
	_DB:AddCodeHelp("SetNormalTexture", [=[Sets the texture used for the button's normal state]=], [=[SetNormalTexture("filename")]=])
	_DB:AddCodeHelp("SetHighlightTexture", [=[Sets the texture used when the button is highlighted]=], [=[SetHighlightTexture("filename" [, "mode"])]=])
	_DB:AddCodeHelp("SetDisabledTexture", [=[Sets the texture used when the button is disabled]=], [=[SetDisabledTexture("filename")]=])
	_DB:AddCodeHelp("LockHighlight", [=[Locks the button in its highlight state]=], [=[LockHighlight()]=])
	_DB:AddCodeHelp("SetPushedTexture", [=[Sets the texture used when the button is pushed]=], [=[SetPushedTexture("filename")]=])
	_DB:AddCodeHelp("GetFontString", [=[Returns the `FontString` object used for the button's label text]=], [=[GetFontString()]=])
	------------------------------------------------------------
	-- Property
	------------------------------------------------------------
	_DB = CreateHelpDB(IGAS.GUI.Widget.Button, "Property")
	_DB:SetBaseHelpDB(CreateHelpDB(IGAS.GUI.Widget.Frame, "Property"))

	_DB:AddCodeHelp("Enabled", [[true if the button is enabled]], IGAS:GetPropertyType("boolean"))
	_DB:AddCodeHelp("HighlightTexture", [[the texture used when the button is highlighted]], IGAS:GetPropertyType("Texture"))
	_DB:AddCodeHelp("HighlightLocked", [[true if the button's highlight state is locked]], IGAS:GetPropertyType("boolean"))
	_DB:AddCodeHelp("Text", [[the text displayed as the button's label]], IGAS:GetPropertyType("string"))
	_DB:AddCodeHelp("PushedTexture", [[the texture used when the button is pushed]], IGAS:GetPropertyType("Texture"))
	_DB:AddCodeHelp("PushedTextOffset", [[the offset for moving the button's label text when pushed]], IGAS:GetPropertyType("Offset"))
	_DB:AddCodeHelp("DisabledTexture", [[the texture used when the button is disabled]], IGAS:GetPropertyType("Texture"))
	_DB:AddCodeHelp("HighlightFontObject", [[the font object used when the button is highlighted]], IGAS:GetPropertyType("Font"))
	_DB:AddCodeHelp("ButtonState", [[the button's current state]], IGAS:GetPropertyType("ButtonState"))
	_DB:AddCodeHelp("Style", [[the style of the button]], IGAS:GetPropertyType("ButtonStyle"))
	_DB:AddCodeHelp("NormalFontObject", [[the font object used for the button's normal state]], IGAS:GetPropertyType("Font"))
	_DB:AddCodeHelp("Locked", [[true if the button is locked]], IGAS:GetPropertyType("boolean"))
	_DB:AddCodeHelp("NormalTexture", [[the texture used for the button's normal state]], IGAS:GetPropertyType("Texture"))
	_DB:AddCodeHelp("DisabledFontObject", [[the font object used for the button's disabled state]], IGAS:GetPropertyType("Font"))
	_DB:AddCodeHelp("FontString", [[the `FontString` object used for the button's label text]], IGAS:GetPropertyType("FontString"))
	_DB:AddCodeHelp("DisabledTexturePath", [[the texture file used when the button is disabled]], IGAS:GetPropertyType("string"))
	_DB:AddCodeHelp("HighlightTexturePath", [[the texture file used when the button is highlighted]], IGAS:GetPropertyType("string"))
	_DB:AddCodeHelp("NormalTexturePath", [[the texture file used for the button's normal state]], IGAS:GetPropertyType("string"))
	_DB:AddCodeHelp("PushedTexturePath", [[the texture file used when the button is pushed]], IGAS:GetPropertyType("string"))
end
